<!DOCTYPE html>
<html   xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head/>
    <h:body>
        <h:outputText value="Theoretically works, but couldn't test due to not being able to press the controls in Flash..."/>
        <h:form>
            <p:photoCam widgetVar="pc" listener="#{photoCamBean.oncapture}"/>
            <p:commandButton type="button" value="Capture" onclick="PF('pc').capture()"/>
        </h:form>
    </h:body>
</html>